(function () {
  if (window.parent === window) {
    return;
  }

  window.onload = () => {
    const message = {
      url: window.location.href,
      title: document.title,
    }
    console.debug('new message: ', message);

    window.parent.postMessage(message, '*');
  }
})();